<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<link type="text/css" rel="stylesheet"
	href="/EasyBuy/statics/css/style.css" />


<script type="text/javascript" src="/EasyBuy/statics/js/menu.js"></script>

<script type="text/javascript" src="/EasyBuy/statics/js/lrscroll_1.js"></script>


<script type="text/javascript" src="/EasyBuy/statics/js/n_nav.js"></script>
<script type="text/javascript" src="/EasyBuy/statics/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
	$(document).ready(function (){
		function list(){
			$.getJSON("LocationServlet","opr=select",callback);
		}
		function  callback(data){
			console.log(data);
			var $history=$("#his").html("");
			for(var i=0;i<data.length;i++){
				$history.append("<li><div class='img'><a title='"+data[i].product_id+"' class='dj'>"+
				"<img src='/EasyBuy/statics/images/"+data[i].fileName+"' width='185' height='162' /></a></div>"+				
				"<div class='name'>"+
							"<a href='#' id='con'>"+data[i].name+"</a></div>"+
				"<div class='price'>"+ 
							"<font>￥<span>"+data[i].price+"</span> </font> &nbsp; "+Math.round(data[i].price/10*Math.pow(10,0))+"R</div></li>");
			}
			
			$(".dj").click(function (){
				var id=$(this).attr("title");
				location.href="ConmmodityDetailsServlet?opr=productDetils&id="+id;
			});
		}
		
		$("#delete").mouseover(function (){
			this.css("color","red");
		});
		
		$("#delete").mouseout(function (){
			this.css("color","black");
		});
		
		$("#delete").click(function (){
			$.get("LocationServlet","opr=delete");
			list();
		});
		
		list();
	});
</script>

			<div class="l_history">
				<div class="his_t">
					<span class="fl">浏览历史</span> <span class="fr"><a id="delete">清空</a>
					</span>
				</div>
				<ul id="his">
					
					
				</ul>
			</div>
